package A01_MyCollection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionDemo5 {
    public static void main(String[] args) {
        Student s1 = new Student("张三",23);
        Student s2 = new Student("lisi",16);
        Student s3 = new Student("wangwu",17);

        Student s4 = new Student("张三",23);
        Collection<Student> coll = new ArrayList<>();
        coll.add(s1);
        coll.add(s2);
        coll.add(s3);
        System.out.println(coll.contains(s4));

    }
}
